.class Lde/dealdoktor/app/activities/SuperDetails$ProgressTask;
.super Landroid/os/AsyncTask;
.source "SuperDetails.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lde/dealdoktor/app/activities/SuperDetails;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "ProgressTask"
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Landroid/os/AsyncTask",
        "<",
        "Ljava/lang/String;",
        "Ljava/lang/Void;",
        "Ljava/lang/Boolean;",
        ">;"
    }
.end annotation


# instance fields
.field final synthetic this$0:Lde/dealdoktor/app/activities/SuperDetails;

.field private userComment:Lde/dealdoktor/app/data/CommentDAO;


# direct methods
.method public constructor <init>(Lde/dealdoktor/app/activities/SuperDetails;)V
    .locals 0
    .parameter

    .prologue
    .line 132
    iput-object p1, p0, Lde/dealdoktor/app/activities/SuperDetails$ProgressTask;->this$0:Lde/dealdoktor/app/activities/SuperDetails;

    .line 131
    invoke-direct {p0}, Landroid/os/AsyncTask;-><init>()V

    return-void
.end method


# virtual methods
.method protected varargs doInBackground([Ljava/lang/String;)Ljava/lang/Boolean;
    .locals 7
    .parameter "args"

    .prologue
    const/4 v6, 0x0

    .line 157
    :try_start_0
    iget-object v1, p0, Lde/dealdoktor/app/activities/SuperDetails$ProgressTask;->this$0:Lde/dealdoktor/app/activities/SuperDetails;

    iget-object v1, v1, Lde/dealdoktor/app/activities/SuperDetails;->currentPost:Lde/dealdoktor/app/data/PostDAO;

    iget v1, v1, Lde/dealdoktor/app/data/PostDAO;->id:I

    invoke-static {v1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v2

    iget-object v1, p0, Lde/dealdoktor/app/activities/SuperDetails$ProgressTask;->this$0:Lde/dealdoktor/app/activities/SuperDetails;

    const v3, 0x7f0b0031

    invoke-virtual {v1, v3}, Lde/dealdoktor/app/activities/SuperDetails;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/EditText;

    .line 158
    invoke-virtual {v1}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v1

    invoke-interface {v1}, Landroid/text/Editable;->toString()Ljava/lang/String;

    move-result-object v3

    iget-object v1, p0, Lde/dealdoktor/app/activities/SuperDetails$ProgressTask;->this$0:Lde/dealdoktor/app/activities/SuperDetails;

    const v4, 0x7f0b0032

    invoke-virtual {v1, v4}, Lde/dealdoktor/app/activities/SuperDetails;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/EditText;

    invoke-virtual {v1}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v1

    invoke-interface {v1}, Landroid/text/Editable;->toString()Ljava/lang/String;

    move-result-object v4

    iget-object v1, p0, Lde/dealdoktor/app/activities/SuperDetails$ProgressTask;->this$0:Lde/dealdoktor/app/activities/SuperDetails;

    const v5, 0x7f0b0030

    invoke-virtual {v1, v5}, Lde/dealdoktor/app/activities/SuperDetails;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/EditText;

    .line 159
    invoke-virtual {v1}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v1

    invoke-interface {v1}, Landroid/text/Editable;->toString()Ljava/lang/String;

    move-result-object v1

    .line 157
    invoke-static {v2, v3, v4, v1}, Lde/dealdoktor/app/data/DataModel;->submitComment(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lde/dealdoktor/app/data/CommentDAO;

    move-result-object v1

    iput-object v1, p0, Lde/dealdoktor/app/activities/SuperDetails$ProgressTask;->userComment:Lde/dealdoktor/app/data/CommentDAO;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 164
    iget-object v1, p0, Lde/dealdoktor/app/activities/SuperDetails$ProgressTask;->userComment:Lde/dealdoktor/app/data/CommentDAO;

    if-eqz v1, :cond_0

    .line 165
    const/4 v1, 0x1

    invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v1

    .line 167
    :goto_0
    return-object v1

    .line 160
    :catch_0
    move-exception v0

    .line 161
    .local v0, e:Ljava/lang/Exception;
    const-string v1, "exception"

    const-string v2, "ProgressTask doInBackground"

    invoke-static {v1, v2, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    .line 162
    invoke-static {v6}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v1

    goto :goto_0

    .line 167
    .end local v0           #e:Ljava/lang/Exception;
    :cond_0
    invoke-static {v6}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v1

    goto :goto_0
.end method

.method protected bridge varargs synthetic doInBackground([Ljava/lang/Object;)Ljava/lang/Object;
    .locals 1
    .parameter

    .prologue
    .line 1
    check-cast p1, [Ljava/lang/String;

    invoke-virtual {p0, p1}, Lde/dealdoktor/app/activities/SuperDetails$ProgressTask;->doInBackground([Ljava/lang/String;)Ljava/lang/Boolean;

    move-result-object v0

    return-object v0
.end method

.method protected onPostExecute(Ljava/lang/Boolean;)V
    .locals 5
    .parameter "success"

    .prologue
    const/4 v4, 0x1

    .line 140
    invoke-virtual {p1}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v2

    if-eqz v2, :cond_1

    .line 141
    iget-object v2, p0, Lde/dealdoktor/app/activities/SuperDetails$ProgressTask;->this$0:Lde/dealdoktor/app/activities/SuperDetails;

    const-string v3, "Ihr Kommentar wurde gesendet"

    invoke-static {v2, v3, v4}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v2

    invoke-virtual {v2}, Landroid/widget/Toast;->show()V

    .line 144
    invoke-static {}, Lde/dealdoktor/app/activities/SuperDetails$DealPagerAdapter;->getFragmentList()Ljava/util/ArrayList;

    move-result-object v1

    .line 145
    .local v1, fragmentList:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lde/dealdoktor/app/fragments/DetailFragment;>;"
    invoke-virtual {v1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :goto_0
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-nez v3, :cond_0

    .line 149
    iget-object v2, p0, Lde/dealdoktor/app/activities/SuperDetails$ProgressTask;->this$0:Lde/dealdoktor/app/activities/SuperDetails;

    const v3, 0x7f0b0030

    invoke-virtual {v2, v3}, Lde/dealdoktor/app/activities/SuperDetails;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/EditText;

    const-string v3, ""

    invoke-virtual {v2, v3}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 153
    .end local v1           #fragmentList:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lde/dealdoktor/app/fragments/DetailFragment;>;"
    :goto_1
    return-void

    .line 145
    .restart local v1       #fragmentList:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lde/dealdoktor/app/fragments/DetailFragment;>;"
    :cond_0
    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lde/dealdoktor/app/fragments/DetailFragment;

    .line 146
    .local v0, fragment:Lde/dealdoktor/app/fragments/DetailFragment;
    iget-object v3, p0, Lde/dealdoktor/app/activities/SuperDetails$ProgressTask;->this$0:Lde/dealdoktor/app/activities/SuperDetails;

    iget-object v3, v3, Lde/dealdoktor/app/activities/SuperDetails;->currentPost:Lde/dealdoktor/app/data/PostDAO;

    iget v3, v3, Lde/dealdoktor/app/data/PostDAO;->id:I

    iget-object v4, p0, Lde/dealdoktor/app/activities/SuperDetails$ProgressTask;->userComment:Lde/dealdoktor/app/data/CommentDAO;

    invoke-virtual {v0, v3, v4}, Lde/dealdoktor/app/fragments/DetailFragment;->addUserComment(ILde/dealdoktor/app/data/CommentDAO;)V

    goto :goto_0

    .line 151
    .end local v0           #fragment:Lde/dealdoktor/app/fragments/DetailFragment;
    .end local v1           #fragmentList:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lde/dealdoktor/app/fragments/DetailFragment;>;"
    :cond_1
    iget-object v2, p0, Lde/dealdoktor/app/activities/SuperDetails$ProgressTask;->this$0:Lde/dealdoktor/app/activities/SuperDetails;

    const-string v3, "Bei der \u00dcbertragung Ihres Kommentars ist leider ein Fehler aufgetreten"

    invoke-static {v2, v3, v4}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v2

    invoke-virtual {v2}, Landroid/widget/Toast;->show()V

    goto :goto_1
.end method

.method protected bridge synthetic onPostExecute(Ljava/lang/Object;)V
    .locals 0
    .parameter

    .prologue
    .line 1
    check-cast p1, Ljava/lang/Boolean;

    invoke-virtual {p0, p1}, Lde/dealdoktor/app/activities/SuperDetails$ProgressTask;->onPostExecute(Ljava/lang/Boolean;)V

    return-void
.end method

.method protected onPreExecute()V
    .locals 3

    .prologue
    .line 135
    iget-object v0, p0, Lde/dealdoktor/app/activities/SuperDetails$ProgressTask;->this$0:Lde/dealdoktor/app/activities/SuperDetails;

    const-string v1, "Kommentar wird gesendet..."

    const/4 v2, 0x1

    invoke-static {v0, v1, v2}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/Toast;->show()V

    .line 136
    return-void
.end method
